package com.demo.validation.custom;


import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Constraint(validatedBy = {LetterValidator.class})
public @interface Letter {
    String message() default "需要是一个字母";
    //分组校验
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}